package com.wz.mapper;

import com.wz.entity.Emp;
import com.wz.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select * from user where username=#{username} and password=#{password}")
    public User findUser(String username,String password);

    @Insert("insert into user(username,password,pictRoad) values(#{username},#{password},#{pictRoad})")
    int saveUser(User user);

    @Select("select * from user")
    List<User> findUsers();

    @Delete("delete  from user where id=#{id}")
    Integer deleteUser(String id);
}
